<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录与注册</title>
    <!-- 引入Bootstrap 4的CSS文件 -->
    <link rel="stylesheet" href="static/css/bootstrap.min.css">
    <!-- 引入自定义的CSS文件 -->
    <link rel="stylesheet" href="static/css/style.css">
</head>

<body>
<div class="container mt-5">
    <div class="row justify-content-center">
        <div class="col-md-6">
            <div class="card">
                <div class="card-header">
                    <ul class="nav nav-tabs card-header-tabs" id="myTab" role="tablist">
                        <li class="nav-item">
                            <a class="nav-link active" id="login-tab" data-toggle="tab" href="#login" role="tab"
                               aria-controls="login" aria-selected="true">登录</a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" id="register-tab" data-toggle="tab" href="#register" role="tab"
                               aria-controls="register" aria-selected="false">注册</a>
                        </li>
                    </ul>
                </div>
                <div class="card-body">
                    <div class="tab-content" id="myTabContent">
                        <div class="tab-pane fade show active" id="login" role="tabpanel"
                             aria-labelledby="login-tab">
                            <form id="loginForm">
                                <div class="form-group">
                                    <label for="loginUsername">账号</label>
                                    <input type="text" class="form-control" id="loginUsername"
                                           placeholder="请输入用户名" required>
                                </div>
                                <div class="form-group">
                                    <label for="loginPassword">密码</label>
                                    <input type="password" class="form-control" id="loginPassword"
                                           placeholder="请输入密码" required>
                                </div>
                                <button type="submit" class="btn btn-primary btn-block">登录</button>
                            </form>
                        </div>
                        <div class="tab-pane fade" id="register" role="tabpanel"
                             aria-labelledby="register-tab">
                            <form id="registerForm">
                                <div class="form-group">
                                    <label for="registerUsername">账号</label>
                                    <input type="text" class="form-control" id="registerUsername"
                                           placeholder="请输入用户名" required>
                                </div>
                                <div class="form-group">
                                    <label for="registerNickname">昵称</label>
                                    <input type="text" class="form-control" id="registerNickname"
                                           placeholder="请输入昵称" required>
                                </div>
                                <div class="form-group">
                                    <label for="registerPhone">手机号码</label>
                                    <input type="text" class="form-control" id="registerPhone"
                                           placeholder="请输入手机号码" required pattern="^[0-9]*$">
<!--                                    加入正则表达式，确定只输入数字-->
                                </div>
                                <div class="form-group">
                                    <label for="registerPassword">密码</label>
                                    <input type="password" class="form-control" id="registerPassword"
                                           placeholder="请输入密码" required>
                                </div>
                                <div class="form-group">
                                    <label for="registerConfirmPassword">确认密码</label>
                                    <input type="password" class="form-control" id="registerConfirmPassword"
                                           placeholder="请再次输入密码" required>
                                </div>
                                <button type="submit" class="btn btn-success btn-block">注册</button>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<!-- 引入jQuery -->
<script src="static/js/jquery.min.js"></script>
<!-- 最新的 Bootstrap4 核心 JavaScript 文件 -->
<script src="static/js/bootstrap.min.js"></script>
<!-- 引入自定义的JavaScript文件 -->
<script src="static/js/index.js"></script>
</body>

</html>